package com.example.class_code.controller;

import com.example.class_code.common.base.BaseController;
import com.example.class_code.model.SysUserEntity;
import com.example.class_code.repository.SysUserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/system/user")
public class SysUserController extends BaseController {

    @Autowired
    SysUserRepository userRepository;

    @GetMapping("/list")
    public List<SysUserEntity> list(){
        return userRepository.findAll();
    }
}
